#include<stdio.h>

int main() {
    int x;
    scanf("%d", &x);
    int a, b, c;
    c = x % 10;
    b = x / 10 % 10;
    a = x / 100;

    printf("%d\n", c * 100 + b * 10 + a);
    return 0;
}


